<template>
	<div id="my_note">
		<div class="nav">
			<ul class="am-avg-sm-4">
				<li class="cur" @click="waitorder">待付款</li>
				<li @click="pay">已付款</li>
				<li @click="waituse">待使用</li>
				<li @click="waitcomment">待评价</li>
			</ul>
		</div>
		<div id="app">
			<div class="cont">
				<ul v-for="b in order">
					<li>
						<div class="box_cont">
							<div title="" @click="itemClicked(b)">
								<div class="pic">
									{{b.active_name}}<br><!-- {{b.time}} -->
									<span class="date">{{b.address_name}}</span>
									<span class="date">{{b.address_address}}</span>
								</div>
								<div class="project_cont">
									<p>{{b.active_cost}}</p><!-- <right></right> -->
								</div>
							</div>
						</div>
						{{b.time}}
					</li>
				</ul>
				<div id="none">
					没有更多了
				</div>
			</div>
		</div>
	</div>
</template>

<script>
	import config from '@/config'

	export default {
		data() {
			return {
				uni,
				usr: '',
				order: {},
				type: 0,
			}
		},

		methods: {
			waitorder: function() {
				uni.redirectTo({ //跳转我的页面
					url: 'waitorder',
				});
			},
			pay: function() {
				uni.redirectTo({ //跳转我的页面
					url: 'pay',
				});
			},
			waituse: function() {
				uni.redirectTo({ //跳转我的页面
					url: 'waituse',
				});
			},
			waitcomment: function() {
				uni.redirectTo({ //跳转我的页面
					url: 'waitcomment',
				});
			},
		},
		onLoad() {
			var that = this;
			uni.request({
				url: `${config.baseUrl}/comment/waituse?token=` + uni.getStorageSync('token'),
				method: 'GET',
				success(r) {
					if (r.data.succ) {
						that.order = r.data.data;
					}
				}
			});
		}
	}
</script>

<style>
	.input {
		width: 50px;
		height: 40px;

	}
</style>
